<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>HOJ后台管理</title>
  <link rel="stylesheet" href="./layui/css/layui.css">
  <script src="./layui/layui.js"></script>
  <script src="../js/jquery-3.3.1.min.js"></script>
  <script src="../js/jquery.form.min.js"></script>
  <!-- editor.md的css文件 -->
  <link rel="stylesheet" href="../plugs/editormd/css/editormd.css" />
  <link rel="stylesheet" href="../plugs/editormd/css/editormd.preview.min.css" />
  <!-- editor.md的js文件 -->
  <script src="../plugs/editormd/lib/marked.min.js"></script>
  <script src="../plugs/editormd/lib/prettify.min.js"></script>
  <script src="../plugs/editormd/lib/raphael.min.js"></script>
  <script src="../plugs/editormd/lib/underscore.min.js"></script>
  <script src="../plugs/editormd/editormd.js"></script>
  <script src="../plugs/editormd/plugins/image-dialog-qiniu/image-dialog-qiniu.js"></script>
  <!-- codemirror格式文件 -->
  <link rel="stylesheet" href="../plugs/codemirror/lib/codemirror.css" />
  <link rel="stylesheet" href="../plugs/codemirror/theme/seti.css" />
  <link rel="stylesheet" href="../plugs/codemirror/addon/fold/foldgutter.css" />
  <!-- codemirror js文件 -->
  <script src="../plugs/codemirror/lib/codemirror.js"></script>
  <script src="../plugs/codemirror/mode/clike/clike.js"></script>
  <script src="../plugs/codemirror/addon/edit/matchbrackets.js"></script>
  <script src="../plugs/codemirror/addon/edit/closebrackets.js"></script>
  <!-- 代码折叠 -->
  <script src="../plugs/codemirror/addon/fold/foldcode.js"></script>
  <script src="../plugs/codemirror/addon/fold/foldgutter.js"></script>
  <script src="../plugs/codemirror/addon/fold/brace-fold.js"></script>
  <script src="./js/controller.js"></script>
  <script src="./js/myajax.js"></script>
  <script src="./js/filter.js"></script>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo">HOJ后台管理</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item"><a href="/front/index">返回主页</a></li>
    </ul>
  </div>
  
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test">
        <li id="tab1" class="layui-nav-item">
          <a href="javascript:;">页面管理</a>
          <dl class="layui-nav-child">
            <dd id="tab1-1"><a href="./index">主页信息</a></dd>
            <dd><a href="javascript:;">bala bala</a></dd>
          </dl>
        </li>
        <li id="tab2" class="layui-nav-item">
          <a href="javascript:;">用户管理</a>
          <dl class="layui-nav-child">
            <dd id="tab2-1"><a href="./userList">用户概览</a></dd>
            <dd id="tab2-2"><a href="./code">代码查看</a></dd>
          </dl>
        </li>
        <li id="tab3" class="layui-nav-item">
          <a href="javascript:;">题目管理</a>
          <dl class="layui-nav-child">
            <dd id="tab3-1"><a href="./problemList">题目概览</a></dd>
            <dd id="tab3-2"><a href="./addProblem">添加题目</a></dd>
          </dl>
        </li>
        <li id="tab4" class="layui-nav-item">
          <a href="javascript:;">比赛管理</a>
          <dl class="layui-nav-child">
            <dd id="tab4-1"><a href="./contestList">比赛概览</a></dd>
            <dd id="tab4-2"><a href="./addContest">添加比赛</a></dd>
            <dd id="tab4-3"><a href="./contestUser">用户总览</a></dd>
          </dl>
        </li>
      </ul>
    </div>
  </div>
  
  <div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;">
      <div class="layui-row">
        <!-- Column -->
        <div class="layui-row" id="div1">
            <div class="layui-col-md6 layui-col-md-offset3">
                <form class="layui-form layui-form-pane" role="form" id="problemInfo">

                    <div class="layui-form-item">
                        <label for="solutionId" class="layui-form-label">solutionId</label>
                        <div class="layui-input-inline">
                            <input type="number" class="layui-input" id="solutionId" name="title"/>
                        </div>
                    </div>

                    <div class="layui-form-item">
                      <input type="button" class="layui-btn" id="submit" value="确认" />
                    </div>

                    <div class="layui-form-item layui-form-text">
                      <label class="layui-form-label">代码</label>
                      <div class="layui-input-block">
                        <textarea id="code" name="code" placeholder="输入solutionId,查看提交代码" class="layui-textarea" rows="26"></textarea>
                      </div>
                    </div>
                </form>
            </div>
        </div>

      </div>
    </div>
  </div>
  
  <div class="layui-footer">
    <!-- 底部固定区域 -->
    © Hunan University Online Judge
  </div>
</div>
<script src="./layui/layui.js"></script>
<script>
  //JavaScript代码区域
  layui.use('element', function(){
    var element = layui.element;
  });
  layui.use('form', function(){
    var form = layui.form;
    form.render();
  })
  var tab = document.getElementById("tab2");
  tab.className += "  layui-nav-itemed";
  var tab_t = document.getElementById("tab2-2");
  tab_t.className += " layui-this";

  layui.use('laydate', function(){
    var laydate = layui.laydate;
    
    //执行一个laydate实例
    laydate.render({
      elem: '#startTime', //指定元素
      type: 'datetime'
    });
    laydate.render({
      elem: '#endTime',
      type: 'datetime'
    });
    laydate.render({
      elem: '#frozenTime',
      type: 'datetime'
    });

  });

  document.getElementById("submit").onclick = function() {
    var solutionId = String(document.getElementById("solutionId").value);
    showUserCode(solutionId);
  }

</script>
</body>
</html>